﻿using System.Windows.Forms;

namespace EzDeploy.Core
{
    public class CopyAssemblyAction : BaseAction
    {
        private ITask _task;
        private Menu _menu;

        public override string Name
        {
            get { return "Copy Assembly"; }
        }

        public override Menu Menu
        {
            get
            {
                if (_menu == null)
                    _menu = new Menu("&Copy Assemblies", Keys.F6);
                return _menu;
            }
        }

        public override ITask Task
        {
            get
            {
                if (_task == null)
                {
                    _task = new CopyAssemblyTask(new CopyAssemblyCommand());
                    _task.Executing += base.OnExecuting;
                    _task.Executed += base.OnExecuted;
                }

                return _task;
            }
        }
    }
}